package com.jctf.net;

import java.util.ArrayList;

/**
 * Defines a class that handles networking and can send callbacks
 * to the registered MessageListeners.
 * @author Nilay Kumar
 *
 */
public abstract class NetworkHandler {

	/**
	 * Holds the registered MessageListeners.
	 */
	protected ArrayList<MessageListener> listeners;
	
	/**
	 * Constructs a NetworkHandler.
	 */
	public NetworkHandler() {
		listeners = new ArrayList<MessageListener>();
	}
	
	/**
	 * Registers the specified MessageListener with the handler.
	 */
	public abstract void registerMessageListener(MessageListener l);
	
}
